package com.xiaobai.netease_news.model;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Android Studio
 * Project: Netease_News
 * Author: Jack
 * Email: jackfangqi1314@gmail.com/jackfangqi@163.com
 * Date: 2015/6/30
 */
public class Photo {
    private String timgurl;
    private String photohtml;
    private String newsurl;
    private String squareimgurl;
    private String cimgurl;
    private String imgtitle;
    private String simgurl;
    private String note;
    private String photoid;
    private String imgurl;

    public String getCimgurl() {
        return cimgurl;
    }

    public String getImgtitle() {
        return imgtitle;
    }

    public String getImgurl() {
        return imgurl;
    }

    public String getNewsurl() {
        return newsurl;
    }

    public String getNote() {
        return note;
    }

    public String getPhotohtml() {
        return photohtml;
    }

    public String getPhotoid() {
        return photoid;
    }

    public String getSimgurl() {
        return simgurl;
    }

    public String getSquareimgurl() {
        return squareimgurl;
    }

    public String getTimgurl() {
        return timgurl;
    }

    public void parseJson(JSONObject jsonObject) {
        if (jsonObject != null) {
            try {
                timgurl = jsonObject.getString("timgurl");
                photohtml = jsonObject.getString("photohtml");
                newsurl = jsonObject.getString("newsurl");
                squareimgurl = jsonObject.getString("squareimgurl");
                cimgurl = jsonObject.getString("cimgurl");
                imgtitle = jsonObject.getString("imgtitle");
                simgurl = jsonObject.getString("simgurl");
                note = jsonObject.getString("note");
                photoid = jsonObject.getString("photoid");
                imgurl = jsonObject.getString("imgurl");
            } catch (JSONException e) {
                e.printStackTrace();
            }
        }
    }
}
